package com.tony.study.designMode.DM3_单例模式;

/**
 * Created with IntelliJ IDEA.
 *
 * @Title: Singleton5
 * @Auther: 皮蛋布丁
 * @Date: 2021/11/25/16:30
 * @Description: 饿汉式(线程安全，调用效率高，但是不能延时加载)
 */
public class Singleton5 {
    private static Singleton5 instance = new Singleton5();
    private Singleton5(){}
    public static Singleton5 getInstance() {
        return instance;
    }
    public void show() {
        System.out.println("你好，我是饿汉式单例模式！");
    }
}
